<?php

namespace app\common\ShaoHuoPay\Gateways\Wechat;

use app\common\ShaoHuoPay\tools\ShCollection;

class MiniappGateway extends MpGateway
{
    /**
     * 小程序支付
     * @param $endpoint
     * @param array $payload
     * @return ShCollection|mixed
     * @throws \App\common\ShaoHuoPay\Exceptions\InvalidArgumentException
     */
    public function pay($endpoint, array $payload)
    {
        $payload['appid'] = $this->config->get('miniapp_id');

        return parent::pay($endpoint, $payload);
    }
}
